package com.bocloud.cmp.interfaces.config;

import java.util.List;
import java.util.Map;

import com.bocloud.cmp.entity.ApplyRecord;
import com.bocloud.common.model.BsmResult;
import com.bocloud.common.model.Param;

/**
 * 申请记录抽象Service接口
 * 
 * @author dongkai
 *
 */
public interface ApplyRecordService {

	/**
	 * 查询列表
	 * 
	 * @param page
	 * @param rows
	 * @param params
	 * @param sorter
	 * @param simple
	 * @param userId
	 * @return
	 */
	public BsmResult list(Integer page, Integer rows, List<Param> params, Map<String, String> sorter, Boolean simple,
			Long userId);

	/**
	 * 待审批的
	 * 
	 * @param userId
	 * @return
	 */
	public BsmResult deal(Long userId);

	/**
	 * 已审批的
	 * 
	 * @param page
	 * @param rows
	 * @param params
	 * @param sorter
	 * @param simple
	 * @param userId
	 * @return
	 */
	public BsmResult done(Integer page, Integer rows, List<Param> params, Map<String, String> sorter, Boolean simple,
			Long userId);

	/**
	 * 详情
	 * 
	 * @param id
	 * @return
	 */
	public BsmResult detail(Long id);

	/**
	 * 待审批详情
	 * 
	 * @param id
	 * @return
	 */
	public BsmResult approveDetail(Long id);

	/**
	 * 通过
	 * 
	 * @param applyId
	 * @param nodeId
	 * @param reason
	 * @param userId
	 * @return
	 */
	public BsmResult approve(Long applyId, Long nodeId, String reason, Long userId);

	/**
	 * 拒绝
	 * 
	 * @param applyId
	 * @param nodeId
	 * @param reason
	 * @param userId
	 * @return
	 */
	public BsmResult refuse(Long applyId, Long nodeId, String reason, Long userId);

	/**
	 * 审批人
	 * 
	 * @return
	 */
	public BsmResult applyUser();

	public BsmResult create(ApplyRecord record, Long userId);

	public BsmResult apply(Long id, String content, String approvers, Long userId);

}
